package com.ourteam.system.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Thu Jul 12 16:34:06 CST 2018
 * Auto Generate Date : 2018-07-20 12:04:59
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class SystemNotifyConfigBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("checkInterval",
            com.ourteam.system.dao.ISysNotifyConfigDAO.CheckInterval);

        mappedDaoFields.put("id", com.ourteam.system.dao.ISysNotifyConfigDAO.Id);

        mappedDaoFields.put("notifyIcon",
            com.ourteam.system.dao.ISysNotifyConfigDAO.NotifyIcon);

        mappedDaoFields.put("notifyListener",
            com.ourteam.system.dao.ISysNotifyConfigDAO.NotifyListener);

        mappedDaoFields.put("notifyMessage",
            com.ourteam.system.dao.ISysNotifyConfigDAO.NotifyMessage);

        mappedDaoFields.put("notifyName",
            com.ourteam.system.dao.ISysNotifyConfigDAO.NotifyName);

        mappedDaoFields.put("status",
            com.ourteam.system.dao.ISysNotifyConfigDAO.Status);

        mappedDaoFields.put("viewPath",
            com.ourteam.system.dao.ISysNotifyConfigDAO.ViewPath);
    }

    private com.ourteam.system.dao.SysNotifyConfig sysNotifyConfig;

    public SystemNotifyConfigBean() {
        super();

        this.sysNotifyConfig = new com.ourteam.system.dao.SysNotifyConfig();
    }

    public SystemNotifyConfigBean(
        com.ourteam.system.dao.SysNotifyConfig sysNotifyConfig) {
        super();

        this.sysNotifyConfig = sysNotifyConfig;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(sysNotifyConfig);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.system.dao.SysNotifyConfig convertToSysNotifyConfig() {
        return this.sysNotifyConfig;
    }

    public com.ourteam.system.dao.SysNotifyConfig convertTo() {
        return this.sysNotifyConfig;
    }

    /**
     * Get checkInterval
     *
     * @return int
     */
    public int getCheckInterval() {
        return (int) this.sysNotifyConfig.getCheckInterval();
    }

    /**
     * Set checkInterval
     *
     * @parameter int
     */
    public void setCheckInterval(int checkInterval) {
        this.sysNotifyConfig.setCheckInterval(checkInterval);
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.sysNotifyConfig.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.sysNotifyConfig.setId(id);
    }

    /**
     * Get notifyIcon
     *
     * @return String
     */
    public String getNotifyIcon() {
        return (String) this.sysNotifyConfig.getNotifyIcon();
    }

    /**
     * Set notifyIcon
     *
     * @parameter String
     */
    public void setNotifyIcon(String notifyIcon) {
        this.sysNotifyConfig.setNotifyIcon(notifyIcon);
    }

    /**
     * Get notifyListener
     *
     * @return String
     */
    public String getNotifyListener() {
        return (String) this.sysNotifyConfig.getNotifyListener();
    }

    /**
     * Set notifyListener
     *
     * @parameter String
     */
    public void setNotifyListener(String notifyListener) {
        this.sysNotifyConfig.setNotifyListener(notifyListener);
    }

    /**
     * Get notifyMessage
     *
     * @return String
     */
    public String getNotifyMessage() {
        return (String) this.sysNotifyConfig.getNotifyMessage();
    }

    /**
     * Set notifyMessage
     *
     * @parameter String
     */
    public void setNotifyMessage(String notifyMessage) {
        this.sysNotifyConfig.setNotifyMessage(notifyMessage);
    }

    /**
     * Get notifyName
     *
     * @return String
     */
    public String getNotifyName() {
        return (String) this.sysNotifyConfig.getNotifyName();
    }

    /**
     * Set notifyName
     *
     * @parameter String
     */
    public void setNotifyName(String notifyName) {
        this.sysNotifyConfig.setNotifyName(notifyName);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.sysNotifyConfig.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.sysNotifyConfig.setStatus(status);
    }

    /**
     * Get viewPath
     *
     * @return String
     */
    public String getViewPath() {
        return (String) this.sysNotifyConfig.getViewPath();
    }

    /**
     * Set viewPath
     *
     * @parameter String
     */
    public void setViewPath(String viewPath) {
        this.sysNotifyConfig.setViewPath(viewPath);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof SystemNotifyConfigBean) == false) {
            return false;
        } // end if

        SystemNotifyConfigBean other = (SystemNotifyConfigBean) obj;

        boolean isEqual = false;

        com.ourteam.system.dao.SysNotifyConfig tempSysNotifyConfig = other.convertToSysNotifyConfig();

        if ((tempSysNotifyConfig == null) || (this.sysNotifyConfig == null)) {
            isEqual = false;
        } else if ((tempSysNotifyConfig == this.sysNotifyConfig) ||
                tempSysNotifyConfig.equals(this.sysNotifyConfig)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static SystemNotifyConfigBean[] toArray(
        com.ourteam.system.dao.SysNotifyConfig[] aSysNotifyConfigs) {
        return toArray(aSysNotifyConfigs, null);
    }

    public static SystemNotifyConfigBean[] toArray(
        com.ourteam.system.dao.SysNotifyConfig[] aSysNotifyConfigs,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aSysNotifyConfigs)) {
            return new SystemNotifyConfigBean[0];
        }

        int length = aSysNotifyConfigs.length;

        SystemNotifyConfigBean[] beans = new SystemNotifyConfigBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new SystemNotifyConfigBean(aSysNotifyConfigs[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aSysNotifyConfigs[i] });
            }
        }

        return beans;
    }
}
